package com.kxxnzstdsw.service.impl

import com.kxxnzstdsw.modle.entity.Routes
import com.kxxnzstdsw.service.SystemService
import com.kxxnzstdsw.utils.getCaptcha
import io.lettuce.core.api.StatefulRedisConnection
import org.koin.core.component.inject
import java.io.OutputStream


class SystemServiceImpl : SystemService {
  private val redis by inject<StatefulRedisConnection<String, String>>()
  override fun buildRoutesTree(): List<Routes> {
    TODO("Not yet implemented")
  }

  override fun getCaptcha(key: String, with: Int, height: Int, out: OutputStream) {
    redis.getCaptcha(key, with, height, out)
  }

//  override fun checkCaptcha(key: String, code: String) {
//    redis.checkCaptcha(key, code)?:ValidatorException(ExceptionCode.V_000002)
//  }
}
